<html>
<head>
	<title></title>
	<link rel="stylesheet" type="text/css" href="./tool/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="./tool/bootstrap/css/bootstrap-theme.min.css">
	<style type="text/css">
	*{
		margin: 0px;
		padding: 0px;
	}
	</style>
</head>
<body>

	<h3>软件重命名程序</h3>

	<h6>当前遍历的文件夹是:
		<?php if(isset($_GET['d'])) {?>
		<a href="<?php echo $_SERVER['SCRIPT_NAME']?>">上一级</a>
		<?php }?>
		/<?php echo $d;?></h6>
		<?php if(!empty($dirs)){ ?>

	<table class="table table-hover" style='width:800;margin:0 auto;boder:10px dotted #785;' >
		<tr>
			<th>文件名</th>
			<th>路径</th>

		</tr>	
		<?php foreach($dirs as $k=>$v) {?>
		<tr>
			<td>
				<?php if(!is_dir($v)){?>
					<span>
					<?php echo basename($v);?>
					</span>
				<?php }else{?>

					<a href="index.php?a=index&d=<?php echo $v;?>">
						<?php echo basename($v);?>
					</a>



				<?php }?>
			</td>
			<td>
				<?php echo $_SERVER['REQUEST_URI'].$v?>
			</td>
		</tr>	
	<?php }?>
		
	</table>


		<?php }else{?>
		<div style='width:800px;height:200px;margin:0 auto;boder:10px dotted #785;'><h2 style="fontsize:50px;padding-top:80px;text-align: center;">当前文件夹为空</h2></div>
			

		<?php }?>
<br>
<hr>
	<div style='width:800px;margin:0 auto;paddingTop="10px"'>

	<form action='./index.php?a=restDate&submit=1' method='post'>
	<!-- <h6>去除前缀内容</h6> -->

		<!-- <input type='text' name='RemoveFileName' value=''> -->
	<h6>替换为</h6>
		<input type='text' name='newFileName' value=''>
		<span style="color:#999"> 将需保留的文件序号替换为:
			<span style='color:red'>[num]</span>
			
		</span>
		<br>
		<br>
		<?php if (isset($_GET['d'])){ ?>
			<input type='hidden' name='filialDir' value="<?php echo $_GET['d']?>">
		<?php }?>

		<input type='submit' class="btn btn-default" value="提交">

	</form>
	</div>


</body>
</html>